Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Map  a  Drive  Based  on  a  Users  Name  and  OU  

 Content of Map a Drive Based on a Users Name and OU.vbs
MD5 Hash: B37B1CA98F3063E636B3A18289965ECD
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)

strUserName = objUser.samAccountName
strOUPath = objUser.Parent

arrContainers = Split(strOUPath, ",")
arrOU = Split(arrContainers(0), "=")
strOU = arrOU(1)

strDrive = "\\Mission\Apps\Timesheets\" & strOU & "\" & strUserName
Set objNetwork = CreateObject("Wscript.Network")
objNetwork.MapNetworkDrive "K:", strDrive


   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a